﻿using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using YXQ.Dao;
using YXQ.IService;
using YXQ.Dao.ViewModel;
namespace YXQ.Service
{

    public class DepartService : IDepartService
    {


        DepartDao dao = new DepartDao();


        #region IDepartService 成员

        public List<Y_Depart> GetList(int startIndex, int maxRow, out int recordcount)
        {

            return dao.GetList(startIndex, maxRow, out recordcount);

        }


        #endregion


        #region IDepartService 成员

        public int Save(DepartModel obj)
        {

            return dao.Save(obj);

        }


        #endregion


        #region IDepartService 成员

        public DepartModel GetOneById(int id)
        {

            return dao.GetOneById(id);

        }


        #endregion

        #region IDepartService 成员
        public int DelById(int id)
        {

            return dao.DelById(id);

        }


        #endregion



        public List<DepartModel> GetListModel(int startIndex, int maxRow, out int recordcount)
        {
            return dao.GetListModel(startIndex, maxRow, out recordcount);
        }


        public List<DepartModel> GetListModel(string dname, int startIndex, int maxRow, out int recordcount)
        {
            return dao.GetListModel(dname,startIndex,maxRow,out recordcount);
        }


        public List<DepartModel> GetAllDepart()
        {
            return dao.GetAllDepart();
        }
    }

}

